package org.example.kafka_test.webConf;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;


@Configuration
public class WebSocketStompConfig{
    /**
     * 创建并配置一个ServerEndpointExporter Bean
     * ServerEndpointExporter用于自动扫描并注册所有标记了@ServerEndpoint注解的类
     * 这个Bean的创建使得WebSocket服务器端点能够被正确识别并初始化
     *
     * @return ServerEndpointExporter实例，用于WebSocket端点的自动扫描和注册
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter()
    {
        return new ServerEndpointExporter();
    }
}